$(document).ready(function(){
   layout();
   navClick();
    $(window).resize(function(){
        layout()
    });
    $(window).bind('beforeunload', function(){
        sessionStorage.clear();
    });
});

function layout(){
    var layout = new Layout();
    layout.iframe();
}

function setUrl(url){
    $('iframe').attr("src",url);
}

function navClick(){
    var item = $('.z-nav a');
    for(let i = 0;i<item.length;i++){
        item.eq(i).click(function(){
            for(let j=0;j<item.length;j++){
                item.eq(j).css({"background-color":"#d3ebef","color":"#000","border-color":"#fff"})
            }
            sessionStorage.clear();
            $(this).css({"background-color": "#0F6099","color":"#fff","border-color":"#0F6099"})
        })
    }
}